<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script !src="">
    let arr1 = [2,7,66,12,3,89,66,3,9,11,5,0]
    function bubbleSort(arr){
        for (var i=0; i<arr.length-1; i++){
            for (var j =0; j<arr.length-i-1; j++){
                if (arr[j] > arr[j+1]){
                    var temp =arr[j]
                    arr[j] = arr[j+1]
                    arr[j+1]=temp
                }
            }
        }
        return arr
    }
    console.log(bubbleSort(arr1))
// 去重  [...new Set(arr)]
  let onlyData=  [...new Set(bubbleSort(arr1))]
    console.log(onlyData)
</script>
